package com.dlxj.util;

import org.apache.struts2.ServletActionContext;

import com.dlxj.entity.User;

public class ConstClass {

	public static final int UPDATE_SUCCESS = 1; // 修改成功

	public static final int UPDATE_ERROR = -1; // 修改错误

	public static final int UPDATE_FAILURE = 0; // 修改失败

	public static final int ADD_SUCCESS = 1; // 添加成功

	public static final int ADD_ERROR = -1; // 添加错误

	public static final int ADD_FAILURE = 0; // 添加失败

	public static final int DELETE_SUCCESS = 1; // 删除成功

	public static final int DELETE_ERROR = -1; // 删除错误

	public static final int DELETE_FAILURE = 0; // 删除失败

	public static final int LOGIN_SUCCESS = 1; // 登录成功

	public static final int LOGIN_DENIED = -1; // 用户被冻结

	public static final int LOGIN_ERROR = 0; // 用户名或密码错误

	public static final int ENABLE = 1; // 启用状态

	public static final int DISABLE = 0; // 禁用状态

	public static final int TASK_AUDITING_PASS = 1; // 任务审核通过

	public static final int TASK_AUDITING_MISSPASS = 0; // 任务未审核

	public static final int TASK_AUDITING_UNPASS = -1; // 任务审核不通过

	public static final String RUN_NORMAL = "正常"; // 正常运行状态;

	public static final String RUN_OVERHAULl = "检修中"; // 检修状态

	public static final String BUG_LEVEL_COMMONLY = "一般"; // 一般缺陷级别

	public static final String BUG_LEVEL_EXIGENCE = "紧急"; // 紧急缺陷级别

	public static final String BUG_LEVEL_SEVERITY = "严重";// 严重缺陷级别

	public static final String TASK_STATE_WAIT = "待分配";// 待分配任务状态

	public static final String TASK_STATE_ASSIGNED = "已分配";// 已分配任务状态

	public static final String TASK_STATE_EXECUTING = "执行中";// 执行中任务状态

	public static final String TASK_STATE_FINISH = "已完成";// 已完成任务状态

	public static final String TASK_STATE_SURE = "已确认";// 已确认任务状态

	public static User getCurrentUser() { // 获取当前用户对象
		return (User) ServletActionContext.getRequest().getSession()
				.getAttribute("user");

	}

}
